package com.hualan.controller;

import com.hualan.pojo.Result;
import com.hualan.service.PricingTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value="/pricingType")
public class PricingTypeController {
    @Autowired
    private PricingTypeService  pricingTypeService;
    @PostMapping(value="/add")
    public Result addPricingType(@RequestBody com.hualan.pojo.PricingType pricingType) {
        return pricingTypeService.addPricingType(pricingType);
    }

    @PostMapping(value="/update")
    public Result updatePricingType(@RequestBody com.hualan.pojo.PricingType pricingType) {
        return pricingTypeService.updatePricingType(pricingType);
    }
}
